Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT add auto mps support #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paulasquin
Copy link

@paulasquin paulasquin commented Jan 8, 2024

  • Add MPS support with auto DEVICE selection between cuda, mps and cpu
  • Applied PEP refacto to the 3 modified files (single quotes, lines max length etc)

Happy to make Apple's ferret work in my Macbook, even if that's a bit slow.

Tested with ferret-13b-v1-3, Macbook M3 Max 14" GPU 40 Core, 64Go RAM, using

export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 # to disable upper limit for memory allocations

featuring my own photo, thank you ferret, even if I don't see much birds.

image

@paulasquin
Copy link
Author

Thanks @gucxa2-mYjnyb-wyjvyg

@Haotian-Zhang if this looks interesting to merge for you, or you'd need any modification, please let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants